import {NestFactory} from '@nestjs/core'
import {AppModule} from "./app.module";
import {ValidationPipe} from '@nestjs/common'
import {CustomProviderInjectPipe} from './customPipes/custom-provider.inject.pipe'

const bootstrap = async () => {
    const app = await NestFactory.create(AppModule)
    app.useGlobalPipes(new ValidationPipe())
    // 报错辣 全局注册的管道无法使用注入，可以在app设置provider APP_PIPE
    // app.useGlobalPipes(CustomProviderInjectPipe);
    await app.listen(8090)
}
bootstrap();
